<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 用户名
      const name = prompt("name?");
      if (name === "admin") {
        // 密码
        const password = prompt("password");
        if (password === "123") {
          console.log("Wellcome");
        } else if (name === null) {
          console.log("Canceled");
        } else {
          console.log("Wrong password");
        }
      } else if (name === null) {
        console.log("Canceled");
      } else {
        console.log("I don't know you");
      }
    </script>
  </body>
</html>
